package com.czd.support.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.czd.base.service.BaseService;
import com.czd.support.model.Warning;

/**
 * @description 预警业务逻辑类
 * @author caoren
 * @date 2015/6/4
 */
@Service
public class WarningService extends BaseService<Warning>{
	public boolean insert(Warning warning){
		return this.insert(sqlId("insert"), warning);
	}
	
	public List<Warning> findByUserId(int userId){
		return this.selectList(sqlId("findByUserId"), userId);
	}
	
	public Warning findBySymbolUserId(Warning warning){
		return this.selectOne(sqlId("findBySymbolUserId"), warning);
	}
	
	public boolean updatePrices(Warning warning){
		return this.update(sqlId("updatePrices"), warning);
	}
	
	public boolean delWarnings(Warning warning){
		return this.delete(sqlId("delBySymbolUserId"), warning);
	}
	
	public boolean updateIsdRemind(Warning warning){
		return this.update(sqlId("updateIsdRemind"), warning);
	}
}
